﻿myApp.factory("EventsService2", function ($http, $q) {
    return {
        checkLogin: function (login) {
            var deferred = $q.defer();
            $http({ method: 'POST', url: '/Login/Check', data: login }).success(deferred.resolve).error(deferred.reject);
            return deferred.promise;
        }
    }
});